package com.ant.storage.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 
 * </p>
 *
 * @author hzd
 * @since 2023-07-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("planned_procurement")
@ApiModel(value="PlannedProcurement对象", description="")
public class PlannedProcurement implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("city_id")
    private Integer cityId;

    @ApiModelProperty(value = "物品id")
    @TableField("commodity_id")
    private Integer commodityId;

    @ApiModelProperty(value = "类型")
    @TableField("commodity_type")
    private Integer commodityType;

    @ApiModelProperty(value = "名称")
    @TableField("commodity_name")
    private String commodityName;

    @ApiModelProperty(value = "单位")
    @TableField("commodity_unit")
    private String commodityUnit;

    @ApiModelProperty(value = "库存数量")
    private String inventory;

    @ApiModelProperty(value = "结存数量")
    @TableField("Inventory_balance")
    private String inventoryBalance;

    @ApiModelProperty(value = "库房计划数量")
    @TableField("warehouse_plan")
    private String warehousePlan;

    @ApiModelProperty(value = "生成计划")
    @TableField("generate_plan")
    private String generatePlan;

    @ApiModelProperty(value = "当月计划")
    @TableField("planned_inventory")
    private String plannedInventory;

    @ApiModelProperty(value = "计划采购单价")
    @TableField("unit_price")
    private BigDecimal unitPrice;

    @ApiModelProperty(value = "采购金额")
    @TableField("purchase_amount")
    private String purchaseAmount;

    @ApiModelProperty(value = "采购金额")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "采购金额")
    @TableField("purchaser_id")
    private String purchaserId;

    private String handlers;

    @TableField("creation_time")
    private Date creationTime;

    @ApiModelProperty(value = "计划采购编号")
    @TableField("planned_number")
    private String plannedNumber;

    @ApiModelProperty(value = "采购状态0 未采购 1 已采购 2 取消采购")
    @TableField("procured_states")
    private Integer procuredStates;

    @ApiModelProperty(value = "分类采购金额集合")
    @TableField(exist = false)
    private Map<Integer, Double> countList;

    @ApiModelProperty(value = "采购总金额")
    @TableField(exist = false)
    private Map<Integer, Double> countToal;


    @ApiModelProperty(value = "详情")
    @TableField(exist = false)
    private List<InventoryLog> detailslist;
}
